package com.hc.wdj.auth.server.error;

import com.hc.wdj.core.error.HcError;

/**
 * @author ryanwdj
 * @since 2024/11/19
 */
public enum OAuthError implements HcError {

    AUTH_MODE_NOT_AVAILABLE(20000, "系统暂未开放此授权模式"),
    MISSING_CLIENT_INFO(20001, "请提供client信息"),
    INVALID_CLIENT_ID(20002, "无效的client_id:%s"),
    INVALID_RESPONSE_TYPE(20003, "无效的response_type:%s"),
    ;

    private final int code;
    private final String message;

    OAuthError(int code, String message){
        this.code = code;
        this.message = message;
    }

    public int getCode(){
        return this.code;
    }

    public String getMessage(){
        return this.message;
    }
}
